#ifndef __WIZ_UTILS_INTERFACE_HPP__SHANHAOBO_19800429__
#define __WIZ_UTILS_INTERFACE_HPP__SHANHAOBO_19800429__

#include "../Core/Container/WizDataTypeArray.hpp"
#include "../Core/Container/WizDataTypeList.hpp"
#include "../Core/Container/WizDataTypeSet.hpp"

#include "./WizUtilsRTTI.hpp"

namespace Wiz
{
    namespace Interface
    {
        struct Type;
        WIZ_DECLARE(::Wiz::Interface::Type);

        namespace Array
        {
            typedef ::Wiz::Array::Type<::Wiz::Interface::Ptr>      Type;
            WIZ_DECLARE(::Wiz::Interface::Array::Type);
            typedef ::Wiz::Interface::Array::Type::tIterator       tIterator;
            typedef ::Wiz::Interface::Array::Type::tIteratorConst  tIteratorConst;
            typedef ::Wiz::Interface::Array::Type::tForEach        tForEach;
            typedef ::Wiz::Interface::Array::Type::tForEachConst   tForEachConst;
            typedef ::Wiz::Interface::Array::Type::tForEachIter    tForEachIter;
        } /// end of namespace Array

        WIZ_DECLARE_ARRAY(::Wiz::Interface::Ptr);
        WIZ_DECLARE_LIST(::Wiz::Interface::Ptr);
        WIZ_DECLARE_SET(::Wiz::Interface::Ptr);

        namespace Object
        {
            struct WIZ_EXPORT Type
            {
                friend struct ::Wiz::Interface::Type;
                virtual ~Type();
                ::Wiz::Void::Type GetInterface(::Wiz::Interface::Ref);
            private:
                ::Wiz::Interface::Set::Type m_InterfaceSet;
                ::Wiz::Void::Type PushInterface(::Wiz::Interface::Ptr IFPtr);
                ::Wiz::Void::Type PopInterface(::Wiz::Interface::Ptr IFPtr);
            };
            WIZ_DECLARE(::Wiz::Interface::Object::Type);
        } /// end of namespace Object

        struct WIZ_EXPORT Type
        {
            friend struct ::Wiz::Interface::Object::Type;
        private:
            ::Wiz::Void::Ptr m_ObjectPtr;
        public:
            ::Wiz::Bool::Type IsValid() const
            {
                return ::Wiz::IsValidPtr(m_ObjectPtr);
            }
            ::Wiz::Bool::Type NotValid() const
            {
                return ::Wiz::NotValidPtr(m_ObjectPtr);
            }
            ::Wiz::Void::Ptr GetObjectPtr() const
            {
                return m_ObjectPtr;
            }
            template<class ObjectPtrT>
            ObjectPtrT GetObjPtr() const
            {
                return ::Wiz::Cast::Reinterpret<ObjectPtrT>(GetObjectPtr());
            }
        public:
            Type() : m_ObjectPtr(WIZ_NULLPTR)
            {}
            virtual ~Type();
        };
    } /// end of namespace Interface
} /// end of namespace Wiz

#endif /*__WIZ_UTILS_INTERFACE_HPP__SHANHAOBO_19800429__*/

